//
//  HSAFNetTool.h
//  KingNews
//
//  Created by dllo on 16/3/7.
//  Copyright © 2016年 ui. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^BlockOfSuccess) (id result);

typedef NS_ENUM(NSUInteger, HSResponseStyle) {
    
        HSJSON,
        HSXML,
    
        HSDATA,
    
    
    
    
};
typedef NS_ENUM(NSUInteger, HSRequestStyle){
    

    HSResponseJSON,
    
    HSResponseString,
    
    
    
};



@interface HSAFNetTool : NSObject

+(void)GETNetWithUrl:(NSString *)url
                body:(id)body
          headerFile:(NSDictionary *)header
            response:(HSResponseStyle)responseStyle
             success:(BlockOfSuccess)success
             failure:(void (^)(NSError * error))failure;

+(void)POSTNetWithUrl:(NSString *)url
                 body:(id)body
            bodyStyle:(HSRequestStyle)bodyRequestStyle
          headerFile:(NSDictionary *)header
            response:(HSResponseStyle)responseStyle
             success:(BlockOfSuccess)success
             failure:(void (^)(NSError * error))failure;


@end
